package common.model{
import mx.collections.ArrayCollection;

[Bindable]
[RemoteClass(alias="org.sunleads.common.entity.DcChinaArea")]
public class DcChinaArea {
	public var zcode:String;
	private var _prov:String;
	private var _city:String;
	private var _town:String;
	public var longitude:Number;
	public var latitude:Number;
	public var sort:Number;//排序字段
	
	public var children:ArrayCollection;
	public var parent:DcChinaArea;
	public var name:String;
	
	public var checked:String = '0';

	public function get town():String
	{
		if(_town == null)
			_town = '';
		return _town;
	}

	public function set town(value:String):void
	{
		_town = value;
	}

	public function get city():String
	{
		if(_city == null)
			_city = '';
		return _city;
	}

	public function set city(value:String):void
	{
		_city = value;
	}

	public function get prov():String
	{
		return _prov;
	}

	public function set prov(value:String):void
	{
		if(_prov == null)
			_prov = '';
		_prov = value;
	}

	public function getFullName():String {
		var fullName:String  = prov;
		if(city!=null){
			fullName = fullName+city;
		}
		if(town!=null){
			fullName = fullName+town;
		}
		return fullName;
	}
}
}